import request from "@/utils/http";
import type { PageResult, ChatMessageVo } from "@/types";

const chatMessage = {
  getChatMessageList(
    chatId: number,
    pageNum: number = 1,
    pageSize: number = 10,
    orderByColumn?: string,
    isAsc?: string
  ) {
    return request.get(`/block/message/${chatId}`, {
      pageNum: pageNum,
      pageSize: pageSize,
      orderByColumn: orderByColumn,
      isAsc: isAsc,
    }, {}, false) as Promise<PageResult<ChatMessageVo>>;
  },
};

export default chatMessage;
